<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
		<script type="text/javascript">
			window.onload = function(){
				
			var d1=document.getElementById("div");
			var b1=document.getElementById("but");
			var s1=document.getElementById("sp");
			var time=0;
			
			b1.onclick = function(){
				se = setInterval(function(){ 
				d1.innerHTML+=">";
				s1.innerHTML=time;
				time++;
				if(time>100){
					alert("加载完成");
					clearInterval(se);
				}
				
				}, 100);
				
			}
			
			
			}
			
			
		</script>
	</head>
	<body>
		<button id="but">点击开始</button>
		<div id="div">
			
			
		</div>
		<span id="sp">
				0
			</span>
	</body>
</html>
